import { Component } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { NzButtonModule } from 'ng-zorro-antd/button';
import { NzDatePickerModule } from 'ng-zorro-antd/date-picker';
import { NzI18nService, zh_CN, en_US } from 'ng-zorro-antd/i18n';

@Component({
  selector: 'app-date-picker-basic-demo',
  standalone: true,
  imports: [NzDatePickerModule, FormsModule, NzButtonModule],
  templateUrl: './date-picker-basic-demo.component.html',
  styleUrl: './date-picker-basic-demo.component.less',
})
export class DatePickerBasicDemoComponent {
  date?: Date;
  constructor(private i18nService: NzI18nService) {}
  triggerLocale() {
    if (this.i18nService.getLocale() == zh_CN) {
      this.i18nService.setLocale(en_US);
    } else {
      this.i18nService.setLocale(zh_CN);
    }
  }
}
